[?php use_helper('Object') ?]
[?php
 $tabs = sfContext::getInstance()->getRequest()->getParameter('tabs', null);
 $params_tabs = "";
 $div_update = "div_panel_contenido";
 if($tabs != null)
 { 
<?php if($this->getParameterValue('tabs', 0) == 0): ?>
      $div_update = "div_tab_<?php echo $this->getModuleName()?>";
<?php endif; ?>
   $params_tabs = "tabs=tabs";
 }
?]
<?php if ($this->getParameterValue('list.filters')): ?>
<div class="sf_admin_filters" id="div_filtros_<?php echo $this->getModuleName()?>" style="display:none">
[?php echo form_tag('<?php echo $this->getModuleName() ?>/list', array('method' => 'get')) ?]

 <fieldset>
    <h2>[?php echo __('Filtros de Busqueda') ?]</h2>
<?php foreach ($this->getColumns('list.filters') as $column): $type = $column->getType() ?>

    <div class="form-row">
    <label for="<?php echo $column->getName() ?>">[?php echo __('<?php echo str_replace("'", "\\'", $this->getParameterValue('list.fields.'.$column->getName().'.name')) ?>:') ?]</label>
    <div class="content">
    [?php echo <?php echo $this->getColumnFilterTag($column) ?> ?]
<?php if ($this->getParameterValue('list.fields.'.$column->getName().'.filter_is_empty')): ?>
    <div>[?php echo checkbox_tag('filters[<?php echo $column->getName() ?>_is_empty]', 1, isset($filters['<?php echo $column->getName() ?>_is_empty']) ? $filters['<?php echo $column->getName() ?>_is_empty'] : null) ?]&nbsp;<label for="filters[<?php echo $column->getName() ?>_is_empty]">[?php echo __('is empty') ?]</label></div>
<?php endif; ?>
    </div>
    </div>
    <?php endforeach; ?>
  </fieldset>
  <ul class="sf_admin_actions">
    <li>
[?php echo button_to_remote(__('Ver Todos'), array (
  'method' => 'GET',
  'update' => 
  array (
    'success' => $div_update,
    'failure' => 'div_error',
  ),
  'url' => '<?php echo $this->getModuleName() ?>/list?filter=filter&'.$params_tabs
), array (
  'class' => 'sf_admin_action_reset_filter',
))  ?]</li>
    <li>[?php echo submit_to_remote('Buscar', 'Buscar', array('url'=>'<?php echo $this->getModuleName() ?>/list?filter=filter&'.$params_tabs, 'update'=>$div_update), array('class'=>'sf_admin_action_filter') ) ?]</li>  </ul>
</form>
</div>
<?php endif; ?>
